﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;


namespace RealEstateWebsite
{
    public partial class User
    {
        private REWEntities db = new REWEntities();

        public bool isUserExist(String email)
        {
            var userExist = db.Users.Any(u => u.Email == email);
            return userExist;
        }

        public string GetPasswordFromEmail(string email)
        {
            var userToGetPass = db.Users.First(u => u.Email == email);
            return userToGetPass.PassWord;
        }

    }
}

